package collection;

public class generic3 {

    public static void fun1(Box<?> b){
//        Object o = b.GetSet(new Object());
//        System.out.println(b);
//        Object o = b.OnlyGet();

    }

    public static void  fun2(Box<? extends Number> b){
        Number number = b.OnlyGet();
    }

     public static <T> void fun3(T a){
         System.out.println(a.getClass().getSimpleName());
    }

    public static void main(String[] args) {
       Box<Integer> b1 = new Box<>();
        fun1(b1);
//        Box<Number> b2 = new Box<>();
        Box<String> b3 = new Box<>();
        fun2(b1);

        fun3(true);
    }
}

class Box<T>{
    public T GetSet(T param){
        return  param;
    }
    public T OnlyGet(){
        return null;
    }
}
